﻿Library.Cookie.Set = function (propertyName, propertyValue) {
    var exDate = new Date();
    exDate.setDate(exDate.getDate() + 360);
    document.cookie = propertyName + "=" + escape(propertyValue) + ";expires=" + exDate.toGMTString();
};

Library.Cookie.Get = function (propertyName) {
    if (document.cookie.length > 0) {
        var cookieStart = document.cookie.indexOf(propertyName + "=");
        if (cookieStart != -1) {
            cookieStart = cookieStart + propertyName.length + 1;
            var cookieEnd = document.cookie.indexOf(";", cookieStart);
            if (cookieEnd == -1) cookieEnd = document.cookie.length;
            return unescape(document.cookie.substring(cookieStart, cookieEnd));
        }
    }
    return "";
};